package service.edu.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import service.edu.result.R;

@RestController
@RequestMapping("/edu")
@CrossOrigin
public class LoginController {
    @ApiOperation("登录")
    @PostMapping("/login")
    public R login() {
        return R.Ok().data("token", "admin");
    }

    @ApiOperation("获取用户信息")
    @GetMapping("/info")
    public R info(){
        return R.Ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }

}

